/*
 * To change this template, choose Tools | Templates
 * and open the template in the editor.
 */
package BUS;

import DTO.DichVu_DTO;
import DAO.DichVu_DAO;
import javax.swing.table.DefaultTableModel;

/**
 *
 * @author PEKEM
 */
public class DichVu_BUS {

    public static DefaultTableModel layBangDichVu() throws Exception {
        return DichVu_DAO.layBangDichVu();
    }

    public static int Insert(DichVu_DTO d) throws Exception {
        return DichVu_DAO.Insert(d);
    }

    public static int Delete(String maDichVu) throws Exception {
        return DichVu_DAO.Delete(maDichVu);
    }

    public static int Update(DichVu_DTO d) throws Exception {
        return DichVu_DAO.Update(d);
    }

    public static String taoMaTuDong(String maGoc, int batDau) throws Exception {
        return DichVu_DAO.taoMaTuDong(maGoc, batDau);
    }

    public static DefaultTableModel layBangDichVuTheoTen(String ten) throws Exception {
        return DichVu_DAO.layBangDichVuTheoTen(ten);
    }

    public static String layMaCuoiCung() throws Exception {
        return DichVu_DAO.layMaCuoiCung();
    }

    public static DefaultTableModel layBangDichVuTheoDonGia(Float tu, Float den) throws Exception {
        return DichVu_DAO.layBangDichVuTheoDonGia(tu, den);
    }

    public static boolean kiemTraDichVuCoTrongCTPhieuDichVu(String madv) throws Exception {
        return DichVu_DAO.kiemTraDichVuCoTrongCTPhieuDichVu(madv);
    }
}
